package com.eric.controller;

import java.util.List;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.eric.bean.Weight;
import com.eric.service.IWeightService;

@Controller
@RequestMapping("/weight")
public class WeightController {
	
	@Resource
    private IWeightService weightService;
	
	@RequestMapping("/show")
	public void getWeight(){
		System.out.println("laile");
		int n = this.weightService.getWeigthById();
		System.out.println(n);
	}
	
	@RequestMapping("/getWeightByTo")
	public List<Weight> getWeightByTo(){
		List<Weight> weights = this.weightService.getWeightByTo();
		return weights;
	}

}
